package com.haizhi.crm.common.constant;

import com.haizhi.crm.common.model.Status;

/**
 * Created by chengmo on 2018/5/17.
 */
public enum BizStatus implements Status {
    /**
     * 40000~49999
     */
    //event 
    INNER_EVENT_APIPARAM_NULL(40001, "行内动态API参数不能为空" ),
    INNER_EVENT_QUERY_ERROR(40002, "行内动态查询异常" ),
    EVENT_QUERY_ERROR(40003, "事件查询异常" ),
    EVENT_APIPARAM_NULL(40004, "事件API参数不能为空" ),
    INNER_EVENT_APIPARAM_ERROE(40005, "行内事件API传参错误" ),
    OUTER_EVENT_APIPARAM_ERROE(40006, "行外动态API传参错误" ),
    OUTER_EVENT_NO_UNDERLINE(40007, "行外事件用户没有下属用户" ),

    //visit record  (startWith 41000)
    VISIT_RECORD_QUERY_ERROR(41001, "查询拜访记录异常" ),
    VISIT_RECORD_APIPARAM_NULL(41002, "拜访记录API参数不能为空" ),
    VISIT_RECORD_NOT_EXISTS(41003, "拜访记录不存在" ),
    VISIT_RECORD_DELETE_ERROR(41004, "删除拜访记录异常" ),
    VISIT_RECORD_SAVE_SUCCESS(41005, "保存成功" ),
    VISIT_RECORD_FAVOURITE_ERROR(41006, "收藏拜访记录异常" ),
    VISIT_RECORD_THUMB_ERROR(41007, "点赞拜访记录异常" ),
    VISIT_RECORD_SAVE_ERROR(41008, "保存拜访记录异常" ),
    VISIT_RECORD_RECENTVIEW_ERROR(41009, "查询用户最近浏览的拜访记录异常" ),
    VISIT_RECORD_ABOUTENTITY_ERROR(41010, "查询拜访记录相关内容异常" ),
    VISIT_RECORD_FAVOURITE_SUCCESS(41011, "收藏成功" ),
    VISIT_RECORD_FAVOURITED(41012, "已经收藏" ),
    VISIT_RECORD_UNFAVOURITE_SUCCESS(41013, "取消收藏成功" ),
    VISIT_RECORD_UNFAVOURITED(41011, "已经取消收藏" ),
    VISIT_RECORD_APIPARAM_ERROE(41012, "拜访记录API传参错误" ),
    VISIT_RECORD_GETCREATOR_ERROE(41013, "获取拜访日程创建者异常" ),


    //product  (startWith 42000)
    PRODUCT_QUERY_ABOUTVISIT_ERROR(42001, "查询产品相关拜访记录异常" ),
    PRODUCT_APIPARAM_NULL(42002, "产品查询API参数为空" ),
    PRODUCT_QUERY_DETAIL_ERROR(42003, "查询产品详情异常" ),
    PRODUCT_QUERY_SALES_ERROR(42004, "查询产品销售记录异常" ),
    PRODUCT_QUERY_ERROR(42005, "查询产品异常" ),

    //favourite(startWith 43000)
    FAVOURITE_SUCCESS(430001, "收藏成功" ),
    UNFAVOURITED(430002, "已经取消收藏" ),
    FAVOURITED(430003, "已经收藏" ),
    UNFAVOURITE_SUCCESS(430004, "取消收藏成功" ),
    FIND_FAVOURITE_STATUS_ERROR(430005, "查询收藏状态异常" ),

    //customer (startWith 44000)
    CUSTOMER_NOTEXISTS(44001, "客户信息不存在" ),
    CUSTOMER_QUERY_ERROR(44002, "查询客户信息异常" ),
    CUSTOMER_APIPARAM_NULL(44003, "查询客户API参数不能为空" ),

    //borrow (startWith 45000)
    BROWSE_COUNT_ERROR(45001, "浏览统计异常" ),

    //user share (startWith 46000)
    USER_SHARE_ERROR(46001, "用户分享异常" ),
    FIND_SHARE_TARGET_ERROR(46002, "查询分享目标对象异常" ),

    //histtory view (startWith 47000)
    HISTORY_VIEW_ERROR(47001, "查询浏览历史异常" ),
    SAVE_HISTORY_VIEW_ERROR(47002, "保存浏览历史异常" ),

    //recommend (startWith 48000)
    RECOMMEND_ERROR(48001, "推荐异常" ),

    //concern (startWith 49000)
    SAVE_CONCERN_ERROR(49001, "关注|取消关注异常" ),
    SAVE_CONCERN_GROUP_ERROR(49002, "保存关注分组信息异常" ),
    FIND_CONCERN_GROUP_ERROR(49003, "查询关注分组信息异常" ),
    HAD_CONCERNED_ERROR(49004, "你已经关注过了" ),
    UN_CONCERNED_ERROR(49005, "你还没有关注过，不能进行取消关注操作" ),
    ;

    private int code;
    private String desc;

    BizStatus(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
